# -*- coding: utf-8 -*-

"""
@File    : testMapping.py
@Author  : Link
@Time    : @2025/5/20 16:55
@Mark    :
"""
import unittest
import pandas as pd


class MyTestCaseSkLearnMap(unittest.TestCase):

    def setUp(self) -> None:
        """

        """
        print("Setup调用")
        self.path = r"..\testApp\Wk811Data\WK_TY_0_J.csv"

    def testPandasCheckRdWk811(self):
        """
        数据列中的FAIL_FLAG, 表示的空坐标, Wafer外部未测区域
        <class 'pandas.core.frame.DataFrame'>
        RangeIndex: 2871050 entries, 0 to 2871049
        Data columns (total 10 columns):
         #   Column          Dtype
        ---  ------          -----
         0   Unnamed: 0      int64
         1   Type            object
         2   dieSize         float64
         3   failureType     object
         4   lotName         object
         5   trainTestLabel  object
         6   waferIndex      float64
         7   X_COORD         int64
         8   Y_COORD         int64
         9   FAIL_FLAG       int64
        dtypes: float64(2), int64(4), object(4)
        memory usage: 219.0+ MB

        ['[0 0]' 'Near-full' 'none' 'Random' 'Edge-Loc' 'Loc' 'Edge-Ring'
         'Scratch' 'Center' 'Donut']
        :return:
        """
        df: pd.DataFrame = pd.read_csv(self.path)
        assert df is not None
        print(df.info())
        print(df.iloc[0])
        print(df["failureType"].unique())
        print(df["trainTestLabel"].unique())

    def testSkL_MK811(self):
        pass
